<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ include file="../common/taglibs.jsp"%>
<sx:head/>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="StyleSheet" type="text/css" href="<%=request.getContextPath()%>/pages/css/common.css"></link>
<link rel="StyleSheet" type="text/css" href="<%=request.getContextPath()%>/pages/css/password.css"></link>
<script type="text/javascript" src="<%=request.getContextPath()%>/pages/js/password.js" ></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/pages/js/jquery-1.5.js" ></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/pages/js/jquery.validate.min.js" ></script>
<script type="text/javascript">
	function showSubCategories4StockAdjustment() {
	    dojo.event.topic.publish("showSubCategories4StockAdjustment");
	}	
	
	function showProducts() {
		dojo.event.topic.publish("showProducts");
	}
</script>
<title>DFASS</title>
</head>
<body>
	<div class="headerContent" align="center">
		<div class="header">
		<%@ include file="../inc/logged_top.jsp" %>			
		</div>
		<div id="nav_container">
		<%@ include file="../menu/mb_menu_inventory.jsp" %>
	    </div>
	</div>
	<div class="bodyContent" align="center">
		<table><tr><td>&nbsp;</td></tr></table>
		<!-- This Empty Table is Required before the content of the body -->
		<s:form theme="simple" id="stockAdjustmentForm" name="stockAdjustmentForm" action="stockAdjustment">		
			<table class="tblAdminNormal">
				<thead>
					<tr>
						
						<td colspan="4">Stock Adjustment</td>
					</tr>
				</thead>
				<tbody>
				    <tr>
				        <td>Category</td>
				        <td> <s:select list="categories" name="cat" id="cat" 
				        									headerKey="0" headerValue="Select a category"  
				        									listKey="id" listValue="name" 
				        									onchange="javascript:showSubCategories4StockAdjustment();return false;" />
						</td>
				    </tr>
				    <tr>
				    	<td> Sub Category </td>
				    	<td>
	                       	<s:url id="pri_url" action="showSubCategories4StockAdjustment" />
	                       	<sx:div id="details" href="%{pri_url}" listenTopics="showSubCategories4StockAdjustment" 
                                        formId="stockAdjustmentForm" 
                                        onchange="javascript:showProducts();return false;" ></sx:div>
				    	</td>
				    </tr>
				    <tr>
				        <td>Product</td>
				        <td>
							<s:url id="pri_url1" action="showProducts" />
	                       	<sx:div id="detail" href="%{pri_url1}" listenTopics="showProducts" 
                                        formId="stockAdjustmentForm" 
                                        onchange="javascript:showProducts();return false;" ></sx:div>				        
				        </td>
				    </tr>
				    <tr>
				        <td>Quantity</td>
				        <td><s:textfield name="qty" cssStyle="width:150px" /></td>
				    </tr>
				    <tr>
				        <td></td> 
				        <td><s:submit value="Adjustment Stock" cssClass="button" /></td> 
				    </tr>
				    <tr>
				        <td colspan="2"><s:actionmessage cssClass="successMsg" />
				        			<s:fielderror cssClass="errorMsg" /></td> 
				    </tr>
				</tbody>
			</table>		
		</s:form>
	</div>				
	
	<div class="footerContent" align="center">
		<div class="footer">
			<%@ include file="/pages/inc/footer.jsp" %>
		</div>
	</div>
</body>
</html>